This invention relates to data communication systems, and more particularly, to a method and mechanism for processing frame data read from a memory for transmission from various ports of a communication switch.
A multiport communication switch may be provided in a data communication network to enable data communication between multiple network stations connected to various ports of the switch. A logical connection may be created between receive ports and transmit ports of the switch to forward received data packets, e.g., frame data, to appropriate destinations. Based on frame headers, a frame forwarding arrangement selectively transfers received frame data (packet data) to a destination station.
Data packets received at a port of the multiport communication switch are transferred to an external memory and subsequently retrieved and placed in a transmit queue (transmit FIFO) for transmission from another port of the switch. The frame data to be transmitted from the multiport communication switch can be transferred to one or more members of a prescribed group of stations (VLAN-virtual LAN) by having the frame data include a VLAN tag header that identifies the frame information as information destined to the prescribed group of stations. In addition, it is possible for plural multiport communication switches to be cascaded together as a separate backbone network by adding a device ID tag to the frame data. When a VLAN tag or a device ID is inserted, four (4) bytes are added to the frame data read from the external memory.
Sometimes, the VLAN tag needs to be changed (modified) or totally striped from the data as a result of a decision made by a decision making engine of the multiport communication switch. While a device ID is not modifiable, it is sometimes necessary to strip the device ID from the data also as a result of a decision made by the decision making engine of the multiport communication switch. When a VLAN tag or device ID is stripped from frame data, four (4) bytes are subtracted from the frame length. Conventionally, VLAN tag insertion/stripping/modification and Device ID insertion/stripping has been accomplished in a multiport communication switch in the respective transmit FIFO. However, this arrangement results in complicated logic in each transmit FIFO to assure that a continuous data flow is transmitted from a respective port. Thus, there is a need to provide a method and mechanism for enabling VLAN tag insertion/stripping/modification as well as Device ID insertion/stripping prior to writing the frame data to the transmit FIFO to avoid further complicating the logic for the transmit FIFO.
The invention provides a novel arrangement for VLAN tag insertion/stripping/modification and Device ID insertion/stripping of frame data read from the External memory. The apparatus includes a multiport data communication system for switching data packets between ports and comprises a plurality of receive ports for receiving data packets, a memory storing the received data packets, a plurality of transmit ports for transmitting data packets, each transmit port having a transmit queue, and a plurality of logic circuitry corresponding to the plurality of transmit ports. Each logic circuitry configured for reading data from the memory corresponding to each data packet to be transmitted from the respective transmit port, reassembling the data read from the memory, and writing the reassembled data to the corresponding transmit queue. Reassembling the data includes inserting/stripping/modifying a VLAN tag and/or inserting/stripping a Device ID into the data read from the memory prior to writing the reassembled data to the corresponding transmit queue.
The apparatus further comprises a monitoring circuit monitoring the received data packets prior to storing in the memory and determining whether a respective data packet should have the VLAN tag inserted/stripped/modified and/or the Device ID inserted/stripped. Inserting/stripping/modifying the VLAN tag and/or inserting/stripping the Device ID when reassembling the data read from memory is based on a result of the determining by the monitoring circuit.
The invention provides also a novel method of processing data packets received by a communication system having a plurality of receive ports for receiving the data packets, a memory storing the received data packets, and a plurality of transmit ports each having a transmit queue, and comprises reading data from the memory corresponding to each data packet to be transmitted from the respective transmit port, reassembling the data read from the memory, and writing the reassembled data to the corresponding transmit queue. Reassembling the data includes inserting/stripping/modifying a VLAN tag and/or inserting/stripping a Device ID into the data read from the memory prior to writing the reassembled data to the corresponding transmit queue.
The method further comprises monitoring the received data packets prior to storing in the memory and determining whether a respective data packet should have the VLAN tag inserted/stripped/modified and/or the Device ID inserted/stripped. Inserting/stripping/modifying the VLAN tag and/or inserting/stripping the Device ID in the reassembling the data read from memory is based on a result of the determining.
Various objects and features of the present invention will become more readily apparent to those skilled in the art from the following description of a specific embodiment thereof, especially when taken in conjunction with the accompanying drawings.